<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:44:"../template/pc/default/article/contents.html";i:1585225696;s:68:"/www/wwwroot/schoolnx.nxers.com/template/pc/default/articlebase.html";i:1585554598;}*/ ?>
<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <title><?php echo $contents['title']; ?></title>
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <meta name="keywords" content="<?php echo $contents['keywords']; ?>">
    <meta name="description" content="<?php echo $contents['description']; ?>">
    <link rel="stylesheet" href="https://cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/static/libs/layui/css/layui.css">
    <link rel="stylesheet" type="text/css" href="/static/default/css/home.base.css" media="all">
    <link rel="stylesheet" type="text/css" href="/static/default/css/base.css" media="all">
    <link rel="stylesheet" type="text/css" href="/static/default/css/user.css" media="all">
    <link rel="shortcut icon" href="<?php echo config('website.icon'); ?>" />
    <link rel="bookmark"href="<?php echo config('website.icon'); ?>" />
    
<link rel="stylesheet" type="text/css" href="/static/default/css/article.css" media="all">

</head>
<body>
<div class="layui-layout  layui-header header">
    <div class="layui-container">
        <a class="logo" href="/"> <img src="<?php echo config('website.logo'); ?>" alt="<?php echo config('website.site_title'); ?>"> </a>
        <ul class="layui-nav layui-layout-left" lay-filter="">
            <li class="layui-nav-item"><a href="/">首页</a></li>
            <?php if(is_array($nav) || $nav instanceof \think\Collection || $nav instanceof \think\Paginator): if( count($nav)==0 ) : echo "" ;else: foreach($nav as $key=>$vo): ?>
            <li class="layui-nav-item">
                <a href="<?php echo $vo['url']; ?>"><?php echo $vo['name']; ?></a>
                <?php if($vo['childNav']): ?>
                <dl class="layui-nav-child">
                    <?php if(is_array($vo['childNav']) || $vo['childNav'] instanceof \think\Collection || $vo['childNav'] instanceof \think\Paginator): if( count($vo['childNav'])==0 ) : echo "" ;else: foreach($vo['childNav'] as $key=>$voo): ?>
                    <dd><a href="<?php echo $voo['url']; ?>"><?php echo $voo['name']; ?></a></dd>
                    <?php endforeach; endif; else: echo "" ;endif; ?>
                </dl>
                <?php endif; ?>
            </li>
            <?php endforeach; endif; else: echo "" ;endif; ?>
        </ul>
        <form class="layui-form" action="<?php echo url('index/course/search'); ?>" style="position: absolute;top: 18px; right:160px;" >
            <div class="layui-form-item">
                <div class="layui-input-inline" style="width:250px;">
                    <input type="text" name="keywords"  lay-verify="required" lay-reqText="请输入课程关键字" placeholder="请输入课程关键字"  class="layui-input search-input" >
                    <button  lay-submit class="layui-btn  layui-btn-position"><i class="layui-icon layui-icon-search"></i></button>
                </div>
            </div>
        </form>
        <?php if($islogin): ?>
        <ul class="layui-nav layui-layout-right">
            <li class="layui-nav-item">
                <a href=""><img src="<?php echo defaultAvatar($userInfo['avatar']); ?>" class="layui-nav-img"></a>
                <dl class="layui-nav-child">
                    <?php if($userInfo['is_teacher'] == 1): ?>
                    <dd><a href="<?php echo url('admin/index/index'); ?>">教师中心</a></dd>
                    <?php endif; ?>
                    <dd><a href="<?php echo url('index/user/index'); ?>">个人中心</a></dd>
                    <dd><a href="<?php echo url('index/user/logout'); ?>">退了</a></dd>
                </dl>
            </li>
        </ul>
        <?php else: ?>
        <ul class="layui-nav fly-nav-user">
            <li class="layui-nav-item"> <a class="fa fa-user-circle fa-fw layui-hide-xs" style="font-size:20px;margin-right:-25px;" href="<?php echo url('index/user/login'); ?>"></a> </li>
            <li class="layui-nav-item"> <a href="<?php echo url('index/user/login'); ?>"  style="margin-right:-15px">登录</a> </li>
            <li class="layui-nav-item"> <a href="<?php echo url('index/user/reg'); ?>"　style="margin-right:-15px">注册</a> </li>
            <span class="layui-nav-bar" style="left: 0px; top: 55px; width: 0px; opacity: 0;"></span>
        </ul>
        <?php endif; ?>
    </div>
</div>

<div class="layui-container">
    <div class="layui-breadcrumb mt15" style="visibility: visible;">
        <a href="<?php echo url('index/article/index'); ?>">首页</a><span lay-separator="">/</span>
        <a href="<?php echo url('index/article/index',['cid'=>hashids_encode($contents['cid'])]); ?>"><?php echo $contents['category_name']; ?></a><span lay-separator="">/</span>
        <a href="<?php echo url('index/article/contents',['id'=>hashids_encode($contents['id'])]); ?>"><cite><?php echo $contents['title']; ?></cite></a>
    </div>
</div>
<div class="layui-container mt15">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md8">
            <div class="layui-card">
                <div class="art-detail mb20">
                    <div class="art-head">
                        <h1 class="title"><?php echo $contents['title']; ?></h1>
                        <div class="meta">
                            <span><i class="layui-icon layui-icon-user"></i>作者:<?php echo (isset($contents['author']) && ($contents['author'] !== '')?$contents['author']:"佚名"); ?></span>
                            <span><i class="layui-icon layui-icon-log"></i><?php echo $contents['create_time']; ?></span>
                            <a href="<?php echo url('index/article/index',['cid'=>hashids_encode($contents['cid'])]); ?>"><i class="layui-icon layui-icon-note"></i><?php echo $contents['category_name']; ?></a>
                        </div>
                    </div>
                    <div class="art-body ">
                        <div class="content">
                            <?php echo $contents['content']; ?>
                        </div>
                    </div>
                    <div class="art-foot">
                        <div class="meta">
                            <span><i class="layui-icon layui-icon-fire"></i>阅读：<?php echo $contents['view']; ?></span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="layui-col-md4">
            <div class="layui-card">
                <div class="layui-card-header">置顶推荐</div>
                <div class="layui-card-body">
                    <ul class="lark-list">
                        <?php if(is_array($tuijian) || $tuijian instanceof \think\Collection || $tuijian instanceof \think\Paginator): if( count($tuijian)==0 ) : echo "" ;else: foreach($tuijian as $i=>$vo): ?>
                        <li>
                            <?php if($i < 2): ?>
                            <span class="layui-badge "><?php echo $i+1; ?></span>
                            <?php else: ?>
                            <span class="layui-badge layui-bg-gray"><?php echo $i+1; ?></span>
                            <?php endif; ?>
                            <a href="<?php echo url('index/article/contents',['id'=>hashids_encode($vo['id'])]); ?>" title="<?php echo $vo['title']; ?>"><?php echo $vo['title']; ?></a>
                        </li>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>

<section class="footer mt20">
    <div class="layui-container">
        <div class="layui-row">
            <div class="layui-col-md3 mt40 footer-logo"><img src="<?php echo config('website.big_logo'); ?>"></div>
            <div class="layui-col-md3 mt40">
                <div class="footer-about">
                    <h3>合作伙伴</h3>
                    <ul>
                        <?php if(is_array($link) || $link instanceof \think\Collection || $link instanceof \think\Paginator): if( count($link)==0 ) : echo "" ;else: foreach($link as $key=>$vo): ?>
                        <li><a href="<?php echo $vo['href']; ?>" target="_blank"><?php echo $vo['title']; ?></a></li>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </ul>
                </div>
            </div>
            <div class="layui-col-md3 mt40">
                <div class="footer-about">
                    <h3>客服中心</h3>
                    <ul>
                        <li><i class="layui-icon layui-icon-cellphone"></i> <?php echo config('contact.tel'); ?></li>
                        <li>(9:30 - 18:00)</li>
                        <li><i class="layui-icon layui-icon-login-qq"></i> <?php echo config('contact.QQ'); ?></li>
                        <li>(9:30 - 20:00)</li>
                    </ul>
                </div>

            </div>
            <div class="layui-col-md3 mt40 footer-logo">
                <div class="footer-wechat">
                    <ul>
                        <li>微信公众号</li>
                        <li>微信小程序</li>
                    </ul>
                    <ul class="foot-qrcode mt15">
                        <li><img src="<?php echo config('website.weixin'); ?>"></li>
                        <li><img src="<?php echo config('website.weixin'); ?>"></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</section>
<section class="copyright">
    <div class="layui-container">
        <p>
            <a href="http://www.miibeian.gov.cn/" target="_blank"><?php echo config('website.site_icp'); ?></a> |
            <a href="http://www.beian.gov.cn/" target="_blank"><img src="/static/default/img/police-badge.png"> <?php echo config('website.police_icp'); ?></a> |
            <?php echo config('website.site_code'); ?> |
            举报邮箱 <?php echo config('contact.email'); ?><br>
            Copyright &copy 2020-2021 <?php echo config('website.site_copyright'); ?> 版权所有 课程和网页设计版权由 <?php echo config('website.site_copyright'); ?> 持有，未经本公司允许，请勿建立镜像和其他违法用途
        </p>
    </div>
</section>
<!--右侧-->
<div class="Right-Nav">
    <div class="Right-nav-list">
        <ul>
            <li class="r-qq">
                <i class="fa fa-qq fa-fw fa-lg"></i>
                <div class="r-box">
                    <div class="r-box-border"><?php echo config('contact.QQ'); ?></div>
                </div>
            </li>
            <li class="r-qrcode">
                <i class="fa fa-weixin fa-fw fa-lg"></i>
                <div class="r-box">
                    <div class="r-box-border"><img src="<?php echo config('website.weixin'); ?>"></div>
                </div>
            </li>
            <li class="r-qq">
                <i class="fa fa-phone fa-fw fa-lg"></i>
                <div class="r-box">
                    <div class="r-box-border"><?php echo config('contact.tel'); ?></div>
                </div>
            </li>
            <li class="r-qq">
                <i class="fa fa-envelope fa-fw fa-lg"></i>
                <div class="r-box">
                    <div class="r-box-border"><?php echo config('contact.email'); ?></div>
                </div>
            </li>
            <li class="r-qrcode">
                <i class="fa fa-qrcode fa-fw fa-lg"></i>
                <div class="r-box">
                    <div class="r-box-border"><img src="<?php echo config('website.weixin'); ?>"></div>
                </div>
            </li>
            <li id="top-back"><a href="javascript:;" class="cndns-right-btn" onclick="topBack()"><i class="layui-icon layui-icon-top"></i></a></li>
        </ul>
    </div>
</div>
<script src="/static/libs/layui/layui.all.js"></script>
<script src="/static/libs/common/jquery.min.js"></script>
<script src="/static/libs/common/common.js"></script>
<script src="https://cdn.bootcss.com/stickyNavbar.js/1.3.5/jquery.stickyNavbar.min.js"></script>

</body>
</html>